<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QColumnView Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QColumnView Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QColumnView class provides a model/view implementation of a
column view. <a href="#details">More...</a></p>

<p>Inherits <a href="qabstractitemview.html">QAbstractItemView</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qcolumnview.html#QColumnView">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />list-of-int <b><a href="qcolumnview.html#columnWidths">columnWidths</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractItemView <b><a href="qcolumnview.html#createColumn">createColumn</a></b> (<i>self</i>, QModelIndex&#160;<i>rootIndex</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#currentChanged">currentChanged</a></b> (<i>self</i>, QModelIndex&#160;<i>current</i>, QModelIndex&#160;<i>previous</i>)</li><li><div class="fn" />int <b><a href="qcolumnview.html#horizontalOffset">horizontalOffset</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qcolumnview.html#indexAt">indexAt</a></b> (<i>self</i>, QPoint&#160;<i>point</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#initializeColumn">initializeColumn</a></b> (<i>self</i>, QAbstractItemView&#160;<i>column</i>)</li><li><div class="fn" />bool <b><a href="qcolumnview.html#isIndexHidden">isIndexHidden</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />QModelIndex <b><a href="qcolumnview.html#moveCursor">moveCursor</a></b> (<i>self</i>, QAbstractItemView.CursorAction&#160;<i>cursorAction</i>, Qt.KeyboardModifiers&#160;<i>modifiers</i>)</li><li><div class="fn" />QWidget <b><a href="qcolumnview.html#previewWidget">previewWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qcolumnview.html#resizeGripsVisible">resizeGripsVisible</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#rowsInserted">rowsInserted</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#scrollContentsBy">scrollContentsBy</a></b> (<i>self</i>, int&#160;<i>dx</i>, int&#160;<i>dy</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#scrollTo">scrollTo</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>, QAbstractItemView.ScrollHint&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</li><li><div class="fn" /><b><a href="qcolumnview.html#selectAll">selectAll</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setColumnWidths">setColumnWidths</a></b> (<i>self</i>, list-of-int&#160;<i>list</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setModel">setModel</a></b> (<i>self</i>, QAbstractItemModel&#160;<i>model</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setPreviewWidget">setPreviewWidget</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setResizeGripsVisible">setResizeGripsVisible</a></b> (<i>self</i>, bool&#160;<i>visible</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setRootIndex">setRootIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setSelection">setSelection</a></b> (<i>self</i>, QRect&#160;<i>rect</i>, QItemSelectionModel.SelectionFlags&#160;<i>command</i>)</li><li><div class="fn" /><b><a href="qcolumnview.html#setSelectionModel">setSelectionModel</a></b> (<i>self</i>, QItemSelectionModel&#160;<i>selectionModel</i>)</li><li><div class="fn" />QSize <b><a href="qcolumnview.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcolumnview.html#verticalOffset">verticalOffset</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qcolumnview.html#visualRect">visualRect</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />QRegion <b><a href="qcolumnview.html#visualRegionForSelection">visualRegionForSelection</a></b> (<i>self</i>, QItemSelection&#160;<i>selection</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qcolumnview.html#updatePreviewWidget">updatePreviewWidget</a></b> (const QModelIndex&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QColumnView class provides a model/view implementation of a
column view.</p>
<p>QColumnView displays a model in a number of QListViews, one for
each hierarchy in the tree. This is sometimes referred to as a
cascading list.</p>
<p>The QColumnView class is one of the <a href="model-view.html">Model/View Classes</a> and is part of Qt's
<a href="model-view-programming.html">model/view framework</a>.</p>
<p>QColumnView implements the interfaces defined by the <a href="qabstractitemview.html">QAbstractItemView</a> class to allow it to
display data provided by models derived from the <a href="qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
<p class="centerAlign"><img alt="" src="images/qcolumnview.png" /></p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QColumnView" />QColumnView.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a column view with a <i>parent</i> to represent a
model's data. Use <a href="qcolumnview.html#setModel">setModel</a>() to set the model.</p>
<p><b>See also</b> <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p>


<h3 class="fn"><a name="columnWidths" />list-of-int QColumnView.columnWidths (<i>self</i>)</h3><p>Returns a list of the width of all the columns in this view.</p>
<p><b>See also</b> <a href="qcolumnview.html#setColumnWidths">setColumnWidths</a>().</p>


<h3 class="fn"><a name="createColumn" /><a href="qabstractitemview.html">QAbstractItemView</a> QColumnView.createColumn (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>rootIndex</i>)</h3><p>To use a custom widget for the final column when you select an
item overload this function and return a widget. <i>index</i> is
the root index that will be assigned to the view.</p>
<p>Return the new view. <a href="qcolumnview.html">QColumnView</a>
will automatically take ownership of the widget.</p>
<p><b>See also</b> <a href="qcolumnview.html#setPreviewWidget">setPreviewWidget</a>().</p>


<h3 class="fn"><a name="currentChanged" />QColumnView.currentChanged (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>current</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>previous</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void currentChanged(const QModelIndex&amp;,const QModelIndex&amp;)</tt>.</p><p>Reimplemented from <a href="qabstractitemview.html#currentChanged">QAbstractItemView.currentChanged</a>().</p>


<h3 class="fn"><a name="horizontalOffset" />int QColumnView.horizontalOffset (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#horizontalOffset">QAbstractItemView.horizontalOffset</a>().</p>


<h3 class="fn"><a name="indexAt" /><a href="qmodelindex.html">QModelIndex</a> QColumnView.indexAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>point</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#indexAt">QAbstractItemView.indexAt</a>().</p>


<h3 class="fn"><a name="initializeColumn" />QColumnView.initializeColumn (<i>self</i>, <a href="qabstractitemview.html">QAbstractItemView</a>&#160;<i>column</i>)</h3><p>Copies the behavior and options of the column view and applies
them to the <i>column</i> such as the <a href="qabstractitemview.html#iconSize-prop">iconSize</a>(), <a href="qabstractitemview.html#textElideMode-prop">textElideMode</a>() and
<a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a>().
This can be useful when reimplementing <a href="qcolumnview.html#createColumn">createColumn</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qcolumnview.html#createColumn">createColumn</a>().</p>


<h3 class="fn"><a name="isIndexHidden" />bool QColumnView.isIndexHidden (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#isIndexHidden">QAbstractItemView.isIndexHidden</a>().</p>


<h3 class="fn"><a name="moveCursor" /><a href="qmodelindex.html">QModelIndex</a> QColumnView.moveCursor (<i>self</i>, <a href="qabstractitemview.html#CursorAction-enum">QAbstractItemView.CursorAction</a>&#160;<i>cursorAction</i>, <a href="qt-keyboardmodifiers.html">Qt.KeyboardModifiers</a>&#160;<i>modifiers</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#moveCursor">QAbstractItemView.moveCursor</a>().</p>
<p>Move left should go to the parent index Move right should go to
the child index or down if there is no child</p>


<h3 class="fn"><a name="previewWidget" /><a href="qwidget.html">QWidget</a> QColumnView.previewWidget (<i>self</i>)</h3><p>Returns the preview widget, or 0 if there is none.</p>
<p><b>See also</b> <a href="qcolumnview.html#setPreviewWidget">setPreviewWidget</a>() and
<a href="qcolumnview.html#updatePreviewWidget">updatePreviewWidget</a>().</p>


<h3 class="fn"><a name="resizeEvent" />QColumnView.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>


<h3 class="fn"><a name="resizeGripsVisible" />bool QColumnView.resizeGripsVisible (<i>self</i>)</h3><h3 class="fn"><a name="rowsInserted" />QColumnView.rowsInserted (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#rowsInserted">QAbstractItemView.rowsInserted</a>().</p>


<h3 class="fn"><a name="scrollContentsBy" />QColumnView.scrollContentsBy (<i>self</i>, int&#160;<i>dx</i>, int&#160;<i>dy</i>)</h3><p>Reimplemented from <a href="qabstractscrollarea.html#scrollContentsBy">QAbstractScrollArea.scrollContentsBy</a>().</p>


<h3 class="fn"><a name="scrollTo" />QColumnView.scrollTo (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, <a href="qabstractitemview.html#ScrollHint-enum">QAbstractItemView.ScrollHint</a>&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</h3><p>Reimplemented from <a href="qabstractitemview.html#scrollTo">QAbstractItemView.scrollTo</a>().</p>


<h3 class="fn"><a name="selectAll" />QColumnView.selectAll (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#selectAll">QAbstractItemView.selectAll</a>().</p>


<h3 class="fn"><a name="setColumnWidths" />QColumnView.setColumnWidths (<i>self</i>, list-of-int&#160;<i>list</i>)</h3><p>Sets the column widths to the values given in the <i>list</i>.
Extra values in the list are kept and used when the columns are
created.</p>
<p>If list contains too few values, only width of the rest of the
columns will not be modified.</p>
<p><b>See also</b> <a href="qcolumnview.html#columnWidths">columnWidths</a>() and <a href="qcolumnview.html#createColumn">createColumn</a>().</p>


<h3 class="fn"><a name="setModel" />QColumnView.setModel (<i>self</i>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>&#160;<i>model</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#setModel">QAbstractItemView.setModel</a>().</p>


<h3 class="fn"><a name="setPreviewWidget" />QColumnView.setPreviewWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Sets the preview <i>widget</i>.</p>
<p>The <i>widget</i> becomes a child of the column view, and will
be destroyed when the column area is deleted or when a new widget
is set.</p>
<p><b>See also</b> <a href="qcolumnview.html#previewWidget">previewWidget</a>() and <a href="qcolumnview.html#updatePreviewWidget">updatePreviewWidget</a>().</p>


<h3 class="fn"><a name="setResizeGripsVisible" />QColumnView.setResizeGripsVisible (<i>self</i>, bool&#160;<i>visible</i>)</h3><h3 class="fn"><a name="setRootIndex" />QColumnView.setRootIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#setRootIndex">QAbstractItemView.setRootIndex</a>().</p>


<h3 class="fn"><a name="setSelection" />QColumnView.setSelection (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>, <a href="qitemselectionmodel-selectionflags.html">QItemSelectionModel.SelectionFlags</a>&#160;<i>command</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#setSelection">QAbstractItemView.setSelection</a>().</p>


<h3 class="fn"><a name="setSelectionModel" />QColumnView.setSelectionModel (<i>self</i>, <a href="qitemselectionmodel.html">QItemSelectionModel</a>&#160;<i>selectionModel</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#setSelectionModel">QAbstractItemView.setSelectionModel</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QColumnView.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>


<h3 class="fn"><a name="verticalOffset" />int QColumnView.verticalOffset (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#verticalOffset">QAbstractItemView.verticalOffset</a>().</p>


<h3 class="fn"><a name="visualRect" /><a href="qrect.html">QRect</a> QColumnView.visualRect (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#visualRect">QAbstractItemView.visualRect</a>().</p>


<h3 class="fn"><a name="visualRegionForSelection" /><a href="qregion.html">QRegion</a> QColumnView.visualRegionForSelection (<i>self</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>selection</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#visualRegionForSelection">QAbstractItemView.visualRegionForSelection</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="updatePreviewWidget" />void updatePreviewWidget (const QModelIndex&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the preview widget should be updated
to provide rich information about <i>index</i></p>
<p><b>See also</b> <a href="qcolumnview.html#previewWidget">previewWidget</a>().</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>